﻿
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global

namespace KinonekoSoftware.Foundation.Markups
{
    public class OverlayBrushExtension : MarkupExtension
    {

        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ThemeSystem.GetARGB(Xplat.Theme.Colors[BrushKey.Overlay100], out var a, out var r, out var g, out var b);

#if WINDOWS
            return new SolidColorBrush
            {
                Color   = Color.FromArgb(a, r, g, b),
            };
#else
            return new SolidColorBrush
            {
                Color = new Color(a, r, g, b),
            };

#endif
        }
    }
}